<template>
	<view>
		<view class="cu-bar bg-white solid-bottom margin-top">
			<view class="action">
				<text class="cuIcon-title text-blue">排行榜</text>
			</view>
		</view>
		<view class="cu-list menu sm-border card-menu margin-top">
			<view class="cu-item" v-for="(item,i) in rankList" :key="item">
				<view class="content">
					<text class="text-grey">{{ item.stuName }}</text>
				</view>
				<view class="action">
					<view class="cu-tag round bg-olive light">{{ item.rank }}分</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				rankList: []
			}
		},
		created() {
			this.getData();
		},
		methods: {
			getData() {
				uni.request({
					url: 'http://localhost:8082/task_admin/rank/list',
					success: (res) => {
						if (res.data.code == 200) {
							this.rankList = res.data.data
						}
					}
				})
			}
		}
	}
</script>

<style>
</style>
